using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class StatusInfoMap : EntityTypeConfiguration<StatusInfo>
	{
		public StatusInfoMap()
		{
			// Primary Key
			this.HasKey(t => t.StatusInfoID);

			// Properties
			this.Property(t => t.StatusType)
				.HasMaxLength(20);
				
			this.Property(t => t.StatusNO)
				.HasMaxLength(20);
				
			this.Property(t => t.StatusName)
				.HasMaxLength(100);
				
			this.Property(t => t.Remark)
				.HasMaxLength(200);
				
			this.Property(t => t.CreatBy)
				.HasMaxLength(20);
				
			this.Property(t => t.UpdateBy)
				.HasMaxLength(20);
				
			// Table & Column Mappings
			this.ToTable("StatusInfo");
			this.Property(t => t.StatusInfoID).HasColumnName("StatusInfoID");
			this.Property(t => t.StatusTypeNO).HasColumnName("StatusTypeNO");
			this.Property(t => t.StatusType).HasColumnName("StatusType");
			this.Property(t => t.StatusNO).HasColumnName("StatusNO");
			this.Property(t => t.StatusName).HasColumnName("StatusName");
			this.Property(t => t.OrderBy).HasColumnName("OrderBy");
			this.Property(t => t.Remark).HasColumnName("Remark");
			this.Property(t => t.IsDelete).HasColumnName("IsDelete");
			this.Property(t => t.CreatBy).HasColumnName("CreatBy");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.UpdateBy).HasColumnName("UpdateBy");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
		}
	}
}

